﻿<dialogs:DialogWindow x:Class="Mnk.TBox.Core.PluginsShared.ScriptEngine.ScriptsConfigurator"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:loc="clr-namespace:Mnk.TBox.Core.PluginsShared.Code.Localization"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:dialogs="clr-namespace:Mnk.Library.WpfControls.Dialogs;assembly=Mnk.Library.WPFControls"
                      xmlns:components="clr-namespace:Mnk.Library.WpfControls.Components;assembly=Mnk.Library.WPFControls"
                      xmlns:scriptEngine="clr-namespace:Mnk.TBox.Core.PluginsShared.ScriptEngine"
                      xmlns:params2="clr-namespace:ScriptEngine.Core.Params;assembly=Mnk.Library.ScriptEngine"
                      mc:Ignorable="d" 
             WindowStartupLocation="CenterOwner" 
             Width="400" Height="400" MinWidth="400" MinHeight="400"
             ShowInTaskbar="True" Title="{Binding Key}">
    <DockPanel>
        <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="10">
            <Button Content="{loc:Tr Reload}" Click="ReloadClick"/>
            <Button IsDefault="True"  Click="ActionClick" Name="btnAction"/>
            <Button Content="{loc:Tr Cancel}" IsCancel="True" Click="CancelClick"/>
        </StackPanel>
        <Label Content="{loc:Tr ScriptsPackageParameters}" Margin="0" Padding="0" HorizontalAlignment="Center" DockPanel.Dock="Top"/>
        <components:ExtListBox AllowDrop="False" Name="Parameters" ScrollViewer.CanContentScroll="False" >
            <components:ExtListBox.ItemTemplate>
                <DataTemplate DataType="{x:Type params2:Parameter}">
                    <DockPanel Margin="5">
                        <TextBlock Text="{Binding Key}" DockPanel.Dock="Top" FontWeight="Bold" HorizontalAlignment="Left"/>
                        <scriptEngine:ParameterTemplate DataContext="{Binding}"/>
                    </DockPanel>
                </DataTemplate>
            </components:ExtListBox.ItemTemplate>
        </components:ExtListBox>
    </DockPanel>
</dialogs:DialogWindow>
